include_directories(gtest)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -g -fPIC")
add_executable(runTests $<TARGET_OBJECTS:lib_ai9_logic_2017> basic/entity_tests.cpp basic/gameloop_test.cpp basic/basic_tests.cpp basic/map_tests.cpp basic/operation_tests.cpp basic/json_test.cpp plant/basePlant.cpp  game/full_gameloop.cpp plant/attackPlant.cpp plant/defensePlant.cpp plant/gatherPlant.cpp plant/linkTest.cpp game/api_test.cpp game/allskill.cpp basic/autoTransfer_tests.cpp)
# add_executable(runTests $<TARGET_OBJECTS:lib_ai9_logic_2017> )
add_subdirectory(googletest)

target_link_libraries(runTests gtest gmock gtest_main)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
else()
    target_link_libraries(runTests dl pthread)
endif()
